package leetcode.秋招.华为OD;


import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

/**
 * @author ：zsy
 * @date ：Created 2022/9/19 21:56
 * @description：
 */
public class Main1 {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        String input = in.next();
        char[] chars = input.toCharArray();
        int len = chars.length;
        int num = 0;
        for (char c : chars) {
            if (c == 'o') {
                num++;
            }
        }
        if (num % 2 == 0) {
            System.out.println(len);
        } else {
            System.out.println(len - 1);
        }

    }
}
